
# 解释下面的代码

grade_map={
    lambda x: x >=90: "A",
    lambda x: 80 <=x <90: "B",
    lambda x: 70 <=x <80: "C",
    lambda x: x<70: "D",
  
}

print(grade_map.items())
def get_level(score):
    return next(v for k,v in grade_map.items() if k(score))


print(f"90 等级为{get_level(90)}")